Skip to content

[Network] Verify swagger common no common - #29931

Draft
Pan-Qi wants to merge 1 commit into
mainfrom
bernard-verify-common-no-common
Draft

[Network] Verify swagger common no common#29931
Pan-Qi wants to merge 1 commit into
mainfrom
bernard-verify-common-no-common

Conversation

@Pan-Qi

@Pan-Qi Pan-Qi commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Description

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • Update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

Copilot AI review requested due to automatic review settings July 30, 2026 11:43
@azure-pipelines

Copy link
Copy Markdown
Contributor
Azure Pipelines:
Successfully started running 1 pipeline(s).
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Network management SDK generation inputs/config so the generated C# models align with the latest Network swagger shapes (notably around “Common.*” naming and systemData typing), reducing drift between swagger and generated output.

Changes:

  • Bumped the azure-rest-api-specs commit used by src/Network/Network.Management.Sdk AutoRest config and commented out legacy “Common.*” name-rewrite directives.
  • Switched multiple NSP-related model constructors/properties from SecurityPerimeterSystemData to the shared SystemData type.
  • Removed the now-redundant generated SecurityPerimeterSystemData model file.

Reviewed changes

Copilot reviewed 1 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/Network/Network.Management.Sdk/README.md Updates generation commit and adjusts/disabled legacy directives related to “Common.*” naming and definition transforms.
src/Network/Network.Management.Sdk/Generated/Models/ServiceGateway.cs Uses SystemData instead of SecurityPerimeterSystemData in constructor signature.
src/Network/Network.Management.Sdk/Generated/Models/SecurityPerimeterTrackedResource.cs Uses SystemData instead of SecurityPerimeterSystemData in constructor signature.
src/Network/Network.Management.Sdk/Generated/Models/SecurityPerimeterSystemData.cs Removes redundant model (replaced by existing SystemData).
src/Network/Network.Management.Sdk/Generated/Models/SecurityPerimeterResource.cs Changes SystemData property/ctor param type to SystemData.
src/Network/Network.Management.Sdk/Generated/Models/SecurityPerimeterProxyResource.cs Uses SystemData instead of SecurityPerimeterSystemData in constructor signature.
src/Network/Network.Management.Sdk/Generated/Models/NspProfile.cs Uses SystemData instead of SecurityPerimeterSystemData in constructor signature.
src/Network/Network.Management.Sdk/Generated/Models/NspLoggingConfiguration.cs Uses SystemData instead of SecurityPerimeterSystemData in constructor signature.
src/Network/Network.Management.Sdk/Generated/Models/NspLinkReference.cs Uses SystemData instead of SecurityPerimeterSystemData in constructor signature.
src/Network/Network.Management.Sdk/Generated/Models/NspLink.cs Uses SystemData instead of SecurityPerimeterSystemData in constructor signature.
src/Network/Network.Management.Sdk/Generated/Models/NspAssociation.cs Uses SystemData instead of SecurityPerimeterSystemData in constructor signature.
src/Network/Network.Management.Sdk/Generated/Models/NspAccessRule.cs Uses SystemData instead of SecurityPerimeterSystemData in constructor signature.
src/Network/Network.Management.Sdk/Generated/Models/NetworkSecurityPerimeter.cs Uses SystemData instead of SecurityPerimeterSystemData in constructor signature.
Comments suppressed due to low confidence (2)

src/Network/Network.Management.Sdk/README.md:116

  • The comment still refers to "Common.SubResourceModel"/"Common.SubResource", but the directives now target "SubResourceModel" and "SubResource". Update the comment to match the actual definition names being transformed.
# move x-ms-azure-resource from Common.SubResourceModel to Common.SubResource

src/Network/Network.Management.Sdk/README.md:101

  • This comment block says "rename Common.CloudError to CloudError", but the associated directive is commented out. Clarify that the transform is a legacy workaround that is currently disabled (or re-enable it if still needed).
# rename Common.CloudError to CloudError, see https://github.com/Azure/azure-rest-api-specs/blob/906c9971ea117692ad6e7e15fe1a0b38ac109c76/specification/network/resource-manager/Microsoft.Network/Network/stable/2025-07-01/common.json#L2026
# Srijani, I noticed in the swaggers generated from tsp, some model names are added the prefix "common.", the change will lead to the change of the generated C# class name. As a result, it may cause some issues and breaking changes. Following is a case. I would suggest you remove the prefix "common.".

Comment on lines 85 to 89
# Strip the "Common." prefix from all definitions so the generated C# class names
# stay backward-compatible with the handwritten Az.Network layer. Without this directive
# every "Common.X" swagger definition becomes a "CommonX" C# class (e.g. CommonRouteTable,
# CommonSubResource, CommonLoadBalancer), breaking the handwritten cmdlets that reference
# the legacy names.
@Pan-Qi

Pan-Qi commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Contributor
Azure Pipelines:
Successfully started running 3 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants